import { Controller, Get, Query } from '@nestjs/common';
import { ApiTags } from '@nestjs/swagger';
import { Rebates_Service } from './rebates.service';
import { util_ApiResponse_Base } from '@/common/util/apiResponse';
import { util_Index_ReturnContent } from '@/common/util/index';
import { Rebastes_RebastesStatic_Dto, Rebates_OrderListFind_Dto } from './assets/rebates.dto';

@Controller('/adm/rebates')
@ApiTags('rebates 返利')
export class Rebates_Controller {
  constructor(private readonly rebates_Service: Rebates_Service) {}

  @Get('/rebaseStatic')
  @util_ApiResponse_Base({
    dataType: 'dataType_ell',
    description: '分销统计数据查询',
    summary: '分销统计数据查询',
  })
  async rebastes_RebastesStatic(@Query() query: Rebastes_RebastesStatic_Dto) {
    return util_Index_ReturnContent(await this.rebates_Service.rebastes_RebastesStatic(query));
  }

  @Get('/orderList')
  @util_ApiResponse_Base({
    dataType: 'dataType_list',
    description: '分销订单详情',
    summary: '分销订单详情',
  })
  async rebastes_OrderListFindByPage(@Query() query: Rebates_OrderListFind_Dto) {
    return util_Index_ReturnContent(await this.rebates_Service.rebastes_OrderListFindByPage(query));
  }
}
